﻿<%@ Page Title="" Language="C#" MasterPageFile="~/cms/cms.master" AutoEventWireup="true" CodeFile="ManageProduct.aspx.cs" Inherits="cms_ManageProduct" %>
<asp:Content ID="Content2" ContentPlaceHolderID="PageTittle" Runat="Server">
    QUẢN LÝ SẢN PHẨM
<hr />
<br /><br />
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
        <asp:Button ID = "btnThem" runat = "server" Text = "Thêm" 
            onclick="btnThem_Click" />
        <br />                
        <center>        
            <asp:GridView ID="GridView1" runat="server" 
            AutoGenerateColumns="False" EnableModelValidation="True" AllowPaging="True" 
                onpageindexchanging="GridView1_PageIndexChanging" PageSize="6" 
                onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                HorizontalAlign="Center" BorderColor="Black" CaptionAlign="Bottom">
        <Columns>
            <asp:BoundField DataField="MaSP" HeaderText="Mã sản phẩm" />
            <asp:BoundField DataField="TenSP" HeaderText="Tên sản phẩm" />
            <asp:BoundField DataField="DonGia" HeaderText="Đơn giá" />
            <asp:BoundField DataField="MoTaChiTiet" HeaderText="Mô tả chi tiết" />
            <asp:BoundField DataField="MaTinhTrangSP" HeaderText="Tình trạng" />
            <asp:BoundField DataField="MaLoaiSanPham" HeaderText="Loại sản phẩm" />
            <asp:BoundField DataField="MaDonViTinh" HeaderText="Đơn vị tính" />
            <asp:BoundField DataField="SoLuongTon" HeaderText="Số lượng" />
            <asp:TemplateField HeaderText="Hình ảnh">
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" Height="110px" Width="167px" ImageUrl='<%# Bind("HinhAnh", "~/images/product/{0}") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField EditText="Sửa" ShowEditButton="True" />
            <asp:CommandField CancelText="Thoát" DeleteText="Xóa" ShowDeleteButton="True" />
        </Columns>
        </asp:GridView></center>
    </div>
</asp:Content>

